<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Spring 3 MVC Series - Contact Manager</title>
</head>
<body>
<form:form method="get" commandName="StoreFrontEligibility" action="invokeStoreFront.htm">
<%----------------------------------------------------------------------------------------------%>

    <H3>Storefron Call API</H3>
    <!--<P>You can insert a description abou this AIP in here...</P>-->

    <table id="table_style">
        <tr>
            <th><form:label path="storefront">Store Front</form:label></th>
            <td>
                <form:select path="storefront" multiple="false" size="1">
                    <form:options items="${storeFrontMap}"/>
                </form:select>
                <br/>
            </td>
        </tr>
        <tr>
            <th><form:label path="eligibleString">Eligible String</form:label></th>
            <td>
                <form:textarea class="valuestring1" path="eligibleString" colspan="20"/>
            </td>
        </tr>
        <tr>
            <th>Options</th>
            <td>
                <form:radiobutton path="mainGroup" value="DisplyView"/> Eligible Offers
                &nbsp;&nbsp;
                <form:radiobutton path="mainGroup" value="PurchaseOfdfer"/> Purchase Offer
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" id="app_button" class="app_button" name="InvokeSF" value="Invoke">
                <input type="submit" id="app_button" class="app_button" name="ClearSFHistory" value="Clear">
                <input type="submit" id="app_button" class="app_button" name="CompareSF" value="Compere">
            </td>
        </tr>
    </table>

<%----------------------------------------------------------------------------------------------%>

    <section id="content_result">

        <div class="resultTable_header">Store Front Call History</div>
        <table id="table-4">
            <thead>
                <tr>
                    <th>Header 01</th>
                    <th>Header 02</th>
                    <th>Header 03</th>
                    <th>Header 04</th>
                </tr>
            </thead>
            <c:forEach var="fileData" items="${StoreFrontView.locationMap}">
                <tbody>
                    <tr>
                        <td><input type="checkbox" value="${fileData.key}"/></td>
                        <td>${fileData.key}</td>
                        <td>${fileData.value}</td>
                        <td>
                            <a href="downloadXML.htm?selectedFile=${fileData.key}" name="download"
                               class="button">Download</a>
                        </td>
                    </tr>
                </tbody>
            </c:forEach>
        </table>
    </section>

<%----------------------------------------------------------------------------------------------%>
</form:form>
</body>
</html>

